package handler

import (
	"github.com/gin-gonic/gin"
	"rent-ease/model"
)

func EaseShow(c *gin.Context) {
	id := c.Query("id")
	var Ease model.Ease
	err := model.DB.Where("id=?", id).Find(&Ease).Error
	if err != nil {
		c.JSON(200, gin.H{
			"code": 500,
			"msg":  "查询失败",
		})
		return
	}
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "查询成功",
		"data": Ease,
	})
}
